from typing import *


class Solution:

    def countWords(self, words1: List[str], words2: List[str]) -> int:

        def f(words):
            return set([k for k, v in Counter(words).items() if v == 1])

        return len(f(words1) & f(words2))